#ifndef __LOGO_INT_EXEC__
#define __LOGO_INT_EXEC__

#include "interpret.h"

#define RESULT_BREAK (-100)
#define RESULT_CONTINUE (-101)

#define RESULT_ABORTTED_BY_USER (-102)

/* returns >= 0 on success, if > 0, "return" from rtn.
 * returns < 0, on failure.
 */
int exec_stmt_seq (rte_t* rte, tree_node_t* compound, value_t* result);
/* returns >= 0 on success, if > 0, "return" from rtn.
 * returns < 0, on failure.
 */
int exec_stmt (rte_t* rte, tree_node_t* stmt, value_t* result);

void print_value (value_t* v);
void print_var_list (rte_t* rte);

int exec_wait (rte_t* rte, tree_node_t* stmt);
int exec_return (rte_t* rte, tree_node_t* stmt, value_t* result);
int exec_assign (rte_t* rte, tree_node_t* stmt);
int exec_cs (rte_t* rte, tree_node_t* stmt);
int exec_cc (rte_t* rte, tree_node_t* stmt);
int exec_pc (rte_t* rte, tree_node_t* stmt);
int exec_if (rte_t* rte, tree_node_t* stmt, value_t* result);
int exec_for (rte_t* rte, tree_node_t* stmt, value_t* result);
int exec_repeat (rte_t* rte, tree_node_t* stmt, value_t* result);
int exec_while (rte_t* rte, tree_node_t* stmt, value_t* result);
int exec_pw (rte_t* rte, tree_node_t* stmt);
int exec_go (rte_t* rte, tree_node_t* stmt);
int exec_tr (rte_t* rte, tree_node_t* stmt);
int exec_tl (rte_t* rte, tree_node_t* stmt);
int exec_fw (rte_t* rte, tree_node_t* stmt);
int exec_dir (rte_t* rte, tree_node_t* stmt);
int exec_bw (rte_t* rte, tree_node_t* stmt);
int exec_message (rte_t* rte, tree_node_t* stmt);
int exec_fontsize (rte_t* rte, tree_node_t* stmt);
int exec_gox (rte_t* rte, tree_node_t* stmt);
int exec_goy (rte_t* rte, tree_node_t* stmt);
int exec_print (rte_t* rte, tree_node_t* stmt);
int exec_break  (rte_t* rte, tree_node_t* stmt);
int exec_continue (rte_t* rte, tree_node_t* stmt);
#endif /* __LOGO_INT_EXEC__ */
